/*
 ------------------------------------------------------------------------------
 Copyright (C) 2013 Eternal Games.

 This file is part of the GLQuake source code.

 The GLQuake source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The GLQuake source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the GLQuake source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// physics_monster.h - monster movement physics
//


#ifndef __PHYSICS_MONSTER_H__
#define __PHYSICS_MONSTER_H__


/*
 ==============================================================================

 Monster physics:

 Simulates the motion of a monster through the environment. The monster
 is typically driven by animations.

 Used for local entities on the client and moveable entities on the server.

 ==============================================================================
*/

struct etPhysicsMonster {
private:
	void					Friction ();
	void					Accelerate (const glqVec3 &wishDir, float wishSpeed, float accel);

	void					UpdateAngles ();

	void					SetWaterLevel ();

	void					CheckGround ();

	void					SlideMove (bool addGravity);
	void					WaterMove ();
	void					AirMove ();
	void					GroundMove ();

public:
	void					MoveMonster (int msec);
};


#endif	// __PHYSICS_MONSTER_H__